import Vue from 'vue'
import Router from 'vue-router'
import deal from '@/components/deal'
import deal2 from '@/components/deal2'
import home from '@/pages/Home'
import Main from '@/pages/Main'
import News from '@/pages/News'
import Login from '@/pages/Login'
import Reset from '@/pages/Reset'
import google from '@/pages/google'
import Register from '@/pages/Register'
import Asset from '@/pages/asset'
import Order from '@/pages/order'
import Notice from '@/pages/notice'
import trading from '@/pages/trading'
import myAssets from '@/pages/myAssets'
import Help from '@/pages/help'
import getContent from '@/pages/getContent'
import HelpMore from '@/pages/HelpMore'
import Search from '@/pages/Search'
import DetailsAnnouncement from '@/pages/DetailsAnnouncement'
import activity from '@/pages/daxin/activity'
import content from '@/pages/daxin/content'
import Account from '@/pages/user/account'
import purchaseHistory from '@/pages/daxin/purchaseHistory'
import contract from '@/pages/contract'
import contractOrder from '@/pages/contractOrder'
import Aboutus from '@/pages/aboutus'
import yieldGold  from '@/pages/yieldGold'
import WithdrawMoney from '@/pages/WithdrawMoney'
// const Main = resolve => require(['@/pages/Main'], resolve)
// const Login = resolve => require(['@/pages/Login'], resolve)
// const Register = resolve => require(['@/pages/Register'], resolve)
// const Reset = resolve => require(['@/pages/Reset'], resolve)
// const News = resolve => require(['@/pages/News'], resolve)
// const Notices = resolve => require(['@/pages/Notices'], resolve)
// const Deal = resolve => require(['@/pages/Deal'], resolve)
// const UserCenter = resolve => require(['@/pages/UserCenter'], resolve)
// const Pandect = resolve => require(['@/pages/finance/Pandect'], resolve)
// const CapitalAccount = resolve => require(['@/pages/finance/CapitalAccount'], resolve)
// const CarbonAccount = resolve => require(['@/pages/finance/CarbonAccount'], resolve)
// const Order = resolve => require(['@/pages/deal/Order'], resolve)
import mainLeft from '@/components/cagree/mainLeft'

Vue.use(Router)

export default new Router({
    // mode: 'hash', // 加上后去掉#
    routes: [{
        path: '/',
        name: 'home',
        component: home,
        meta: {
            // requireAuth: true,
        }
    },
    {
        path: '/home',
        name: 'home',
        component: home
    },
    {
        path: '/deal',
        name: 'deal',
        component: deal,
        meta: {
            id: 0,
            // requireAuth: true
        }
    },
    {
        path: '/deal2',
        name: 'deal2',
        component: deal2,
    },
    {
        path: '/main',
        component: Main,
        meta: {
            // requireAuth: true
        }
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/reset',
        component: Reset
    },
    {
        path: '/yieldGold',
        component: yieldGold
    },
    {
        path: '/WithdrawMoney',
        component: WithdrawMoney
    },
    {
        path: '/register',
        component: Register
    },
    {
        path: '/trading',
        component: trading
    },
    {
        path: '/myAssets',
        component: myAssets
    },
    //资产
    {
        path: '/asset',
        component: Asset,
        meta: {
            requireAuth: true
        }
    },
    {
        path: '/order',
        component: Order,
        meta: {
            requireAuth: true
        }
    },
    {
        path: '/notice',
        component: Notice,
        meta: {
            // requireAuth: true
        }
    },
    {
        path: '/google',
        component: google
    },
    // {
    //   path: '/reset',
    //   component: Reset
    // },
    {
        path: '/News',
        component: News
    },
    {
        path: '/account',
        component: Account
    },
    {
        path: '/help',
        component: Help
    },
    {
        path: '/aboutus',
        component: Aboutus
    },
    {
        path: '/getContent',
        component: getContent
    },
    {
        path: '/HelpMore',
        component: HelpMore
    },
    {
        path: '/search',
        component: Search
    },
    {
        path: '/DetailsAnnouncement',
        component: DetailsAnnouncement
    },
    {
        path: '/activity',
        component: activity,
        meta: {
            // requireAuth: true
        }
    },
    {
        path: '/content',
        component: content
    },
    {
        path: '/purchaseHistory',
        component: purchaseHistory
    },
    {
        path: '/contract',
        component: contract
    },
    {
        path: '/contractOrder',
        component: contractOrder
    },
    {
        path: '/mainLeft',
        component: mainLeft
    },
        // {
        //   path: '/news/:id',
        //   component: News
        // }
    ],
    
})